import pygame
import modGame

pygame.init()
screen_size = (800, 600)
screen = pygame.display.set_mode(screen_size)

keep_going = True

timer = pygame.time.Clock()
margin = 8

jet = modGame.Jet()
jetX = (screen.get_width() - jet.width) / 2 # 水平居中
jetY = screen.get_height() - margin - jet.length # 垂直靠底部
jet.SetPositon(jetX, jetY) # 设定飞机的初始位置

while keep_going:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            keep_going = False
    
    screen.fill((0, 0, 0))
    # 飞机
    jet.render(screen)

    pygame.display.update()
    timer.tick(60)

pygame.quit()